Skip to content

fix(examples): correct f_address seed key to postalCode - #14090

Merged
os-support-ai merged 1 commit into
mainfrom
claude/issue-13388-showcase-seed-postalcode
Sep 1, 2026
Merged

fix(examples): correct f_address seed key to postalCode#14090
os-support-ai merged 1 commit into
mainfrom
claude/issue-13388-showcase-seed-postalcode

Conversation

@os-support-ai

Copy link
Copy Markdown
Collaborator

Fixes #13388

What

examples/app-showcase/src/data/seed/index.ts seeded the field-zoo specimen's
f_address value with postal_code, a key AddressSchema
(packages/spec/src/data/field-value.zod.ts) does not declare — the schema
declares camelCase postalCode. One key, one line:

- f_address: { street: '1 Main St', city: 'Seattle', state: 'WA', postal_code: '98101', country: 'US' },
+ f_address: { street: '1 Main St', city: 'Seattle', state: 'WA', postalCode: '98101', country: 'US' },

No renderer change and no consumer-side alias — the producer (this seed) was
wrong relative to the contract, and the fix is at the producer per AGENTS.md's
contract-first directive.

Evidence

valueSchemaFor({ type: 'address' }, 'stored').safeParse(...) before/after,
built @objectstack/spec dist:

OLD (postal_code): { success: true, data: { street: '1 Main St', city: 'Seattle', state: 'WA', country: 'US' } }
                                                                                    ^ postalCode silently stripped
NEW (postalCode):  { success: true, data: { street: '1 Main St', city: 'Seattle', state: 'WA', postalCode: '98101', country: 'US' } }
                                                                                    ^ retained

Fixture sweep

Repo-wide grep for postal_code, 98101, f_address found no fixture or test
pinning the old (wrong) seed value:

No fixture needed updating.

Out of scope (per the card's explicit ⛔s)

Tests

  • pnpm --filter '@objectstack/example-showcase' exec vitest run — 26 test
    files, 364 tests, all passed (includes test/seed.test.ts).
  • pnpm --filter '@objectstack/example-showcase' run typecheck — clean.
  • pnpm --filter '@objectstack/dogfood' exec vitest run test/field-zoo-roundtrip.dogfood.test.ts test/field-zoo-value-shape.test.ts
    — 2 test files, 91 tests, all passed. This boots the real showcase stack
    (real HTTP round-trip) with the fixed seed — clean boot, showcase_field_zoo
    seeded without error.
  • Local gates derived from the diff via node scripts/pm/dispatch-gates.mjs
    (16 matched families) — all green; see the dev report comment on the issue
    for the full list and the one CI-only exception
    (check:dual-build-cjs-loads needs a full-tree pnpm build, which is CI's
    Build Core job).

Changeset

None — examples/app-showcase is "private": true and releases nothing;
skip-changeset label applied per repo convention (pr-automation.yml's
"releases nothing (… examples/ …)" route).


Generated by Claude Code

The showcase field-zoo specimen seeded `postal_code`, a key
AddressSchema does not declare (it declares camelCase `postalCode`).
The value was silently accepted with the postal code stripped by
zod's default unrecognized-key handling, and the objectui field
renderer's ZIP box rendered empty since it reads addr.postalCode.

Fixes #13388

_Generated by [Claude Code](https://claude.ai/code)_
@os-support-ai os-support-ai added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026 — with Claude
@os-support-ai
os-support-ai marked this pull request as ready for review September 1, 2026 04:45
@os-support-ai
os-support-ai added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 4bf15db Sep 1, 2026
36 checks passed
@os-support-ai
os-support-ai deleted the claude/issue-13388-showcase-seed-postalcode branch September 1, 2026 05:14
os-zhuang pushed a commit that referenced this pull request Sep 2, 2026
…3802)

Maintainer ruling 2026-09-01 (option A): LocationValueSchema and
AddressSchema (= AddressValueSchema) were all-optional stripping z.objects,
so a value with a wrong key set parsed green and the wrong keys vanished —
the showcase seed's postal_code (#13388) was accepted, dropped and rendered
as an empty ZIP box, and a stored-value scan over the class could only
report a clean count. Both are strictObject now; FileValueSchema stays the
one deliberate looseObject. The refusal names the key and the rename
(postal_code/zipCode -> postalCode, latitude/longitude -> lat/lng).

Ordered census first: every in-repo corpus that writes address/location
values (8459 files, 196,098 leaf literals, 57 shaped literals) carries zero
keys outside the declared sets other than batch D's own tolerance pin, which
is repinned here — the repair commit the ruling ordered is empty by
measurement (#13388's seed fix landed at #14090).

Where the refusal bites is ADR-0104's unchanged evidence gate: defaultValue
literals and action params reject at authoring; record writes reject only on
a deployment that attested adr-0104-value-shapes (or the env opt-in) and stay
warn-first elsewhere; os migrate value-shapes now counts the key; no read
path parses these shapes. Strictness-ledger triage row re-verdicted
open -> authorable with the census and the migration note, the strip-map row
dropped (reverse pin), finding 21 added, counts regenerated; D3 semantic
entry address-location-value-unknown-keys-refused registered under 18.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GDA48PuRFrHyRfdkBz8m21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants